import java.net.*;

class ClientDemo {

	public static void main(String[] args) {
		try {
			// 连接上ip地址127.0.0.1的主机，端口6666的程序
			Socket client  = new Socket("127.0.0.1", 6666);
			System.out.println("连接服务器成功！");
		} catch (Exception e) {
			e.printStackTrace();
			System.out.println("连接服务器失败！");
		}

	}
}